package com.minglead.crawler.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

/**
 * @description: 舆情爬虫配置表
 * @author: bxh
 * @date: 2024-8-1
 **/
@Data
@TableName("YQ_CRAWLER")
public class YqCrawlerEntity extends BaseEntity {

    @Schema(description = "媒体名称")
    @TableField(value = "NAME")
    private String name;

    @Schema(description = "媒体Key")
    @TableField(value = "KEY_VALUE")
    private String keyValue;

    @Schema(description = "执行次数")
    @TableField(value = "RUN_TIMES")
    private Integer runTimes;

    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    @Schema(description = "最近一次启动时间")
    @TableField(value = "LAST_RUN_TIME")
    private Date lastRunTime;

    @Schema(description = "历史爬取数量")
    @TableField(value = "TOTAL_RECORDS")
    private Integer totalRecords;

    @Schema(description = "当前爬取数量")
    @TableField(value = "CURRENT_RECORDS")
    private Integer currentRecords;

    @Schema(description = "状态，0:停用，1:运行中")
    @TableField(value = "STATE")
    private Integer state;

    @Schema(description = "日志文件路径")
    @TableField(value = "LOG_FILE")
    private String logFile;

    @Schema(description = "关键词文本")
    @TableField(value = "KEY_WORD")
    private String keyWord;

    @Schema(description = "是否采用全局关键词，0:否，1:是")
    @TableField(value = "GLOBAL_KEY_WORD")
    private Integer globalKeyWord;

}
